<template>
  <div>
    <div class="pane_content">
      <el-avatar
        shape="square"
        size="large"
        style="margin:30px 0;background-color:rgba(51,102,255,.05);color:#36f"
      >{{postInfo.readCount}}</el-avatar>
      <div class="content">
        <p>
          <!-- <a :href="'/showPost/'+postInfo._id">{{postInfo.title}}</a> -->
          <router-link :to="{path:'/home/show/',query:{id:postInfo._id}}">{{postInfo.title}}</router-link>
        </p>
        <div class="author">
          <router-link
            tag="a"
            :to="{path:postInfo.publisher===username?'/usercenter':'/centerT',query:{id:postInfo.publisher}}"
          >
            <el-avatar size="small" :src="postInfo.imgUrl" style="margin-top:5px;"></el-avatar>
          </router-link>
          <div class="author_info">{{postInfo.publisher}} 发布于{{postInfo.pubDate}}</div>
        </div>
      </div>
    </div>
    <el-divider></el-divider>
  </div>
</template>
<script>
export default {
  data() {
    return {
      imgUrl: ''
    }
  },
  props: ['postInfo', 'username'],
  methods: {},
  mounted() {}
}
</script>
<style lang="less" scoped>
.pane_content {
  display: flex;
  height: 100px;
  .content {
    display: flex;
    flex-direction: column;
    margin-left: 20px;
    font-size: 14px;
    p {
      margin-top: 22px;
      margin-bottom: 5px;
      font-weight: 400;
      text-align: left;
      a {
        cursor: pointer;
      }
      a:hover {
        color: #36f;
      }
    }
    .author {
      display: flex;
      height: 40px;
      font-size: 12px;
      color: #565b69;
      line-height: 40px;
      .author_info {
        margin-left: 5px;
      }
    }
  }
}
.el-divider--horizontal {
  margin: 0 0;
}
</style>
